package top.huxy.test.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import top.huxy.test.model.LoginForm;
import top.huxy.web.core.Result;
import top.huxy.web.core.ReturnResultAble;

@RestController
@RequestMapping("/user")
public class UserController implements ReturnResultAble {
    @Autowired
    RedisTemplate<String, Object> redisTemplate;

    @GetMapping("/login")
    public Result<LoginForm> loginGet(LoginForm loginForm) {
        return success(loginForm);
    }

    @PostMapping("/login")
    public Result<LoginForm> loginPost(LoginForm loginForm) {
        return success(loginForm);
    }
}